<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.model' );
class ModelSimCategoriesSimCategories extends JModel
{
var $_SimCategories = null;
var $_id = null;
function __construct()
{
parent::__construct();
$id = JRequest::getVar('id', 0);
$this->_id = $id;
}
function getSimCategories()
{
if(!$this->_SimCategories)
{
$query = "SELECT a.sim_id, a.sim_numb,a.price,a.curency,b.provider_name FROM #__sim as a,#__sim_provider as b WHERE
a.provider_id = b.provider_id and categori_id = '" . $this->_id . "'";
$this->_SimCategories = $this->_getList($query, 0, 0);
}
return $this->_SimCategories;
}
}
?>